-- paquetage de base
with Ada.Text_IO, Ada.Integer_Text_IO;use Ada.Text_IO,Ada.Integer_Text_IO;
with GLib;

-- paquetages de gestion des exceptions
with Ada.Exceptions;use Ada.Exceptions;

-- paquetage du projet
with T_Fixe; use T_Fixe;

-- paquetages de l'interface Homme Machine (gtk)
with Gtk.Window, Gtk.Button, Gtk.Container, Gtk.Table, Gtk.Text_View, Gtk.Label, Gtk.Widget,Gtk.Handlers, Gtk.Marshallers, Gtk.Spin_Button, Gtk.Scrolled_Window;


-------------------------------------------------------------------------------------------------------------------------------------------
--								TELEPHONE
-------------------------------------------------------------------------------------------------------------------------------------------

package T_Telephone is

	type Telephone;

	type ptr_Telephone is access Telephone;

	type Telephone is record
	-- fenetre d'interaction
		telephone	: Gtk.Window.Gtk_Window;
		b_appeler	: Gtk.Button.Gtk_Button;
		b_parler	: Gtk.Button.Gtk_Button;
		t_fond		: Gtk.Table.Gtk_Table;
		ecran		: Gtk.Spin_Button.Gtk_Spin_Button;
		msg_entrant	: Gtk.Text_View.Gtk_Text_View;
		msg_sortant	: Gtk.Text_View.Gtk_Text_View;
		fixe		: T_Fixe.ptr_Fixe;
		
		correspondant	: ptr_Telephone;
		
	end record;


	package Telephone_Callback is new Gtk.Handlers.User_Callback
			(Gtk.Widget.Gtk_Widget_Record, ptr_Telephone);

	procedure Telephone_New(tel: ptr_Telephone;unNum : GLib.Guint);

	procedure Afficher(tel: ptr_Telephone; msg : in String);

	procedure Mettre_en_relation(tel: ptr_Telephone; correspondant : ptr_Telephone);

	procedure Action_Appeler 
		(Button: access Gtk.Widget.Gtk_Widget_Record'Class;
		tel : ptr_Telephone);

	procedure Action_Parler 
		(Button: access Gtk.Widget.Gtk_Widget_Record'Class;
		tel : ptr_Telephone);

	

end T_Telephone;



